﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace Fishing.WCFContracts
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in both code and config file together.
    public class FangbuchProvider : IFangbuchProvider
    {

        public List<FangbuchContract> LoadFangBuchContracts()
        {
            List<FangbuchContract> neueListe = new List<FangbuchContract>();
            Fishing.Objects.IFangbuchProvider provider = new Fishing.Objects.FangbuchProvider();
            var eintraege = provider.LoadAllFangbuchEintraege();
            eintraege.ForEach((x) => neueListe.Add(new FangbuchContract()
            {
                FangDatum = x.FangDatum,
                FangFisch = x.FangFisch,
                FangPlatz = x.FangPlatz
                
            }));
            return neueListe;
        }
    }
}
